var queryModel = {
    //分页参数
    page: '1',
    rows: '100',
}
//动态生成select内容
function gettypes(contextPath, dataArray, name){
    console.log(dataArray)
    var str="";
    $.ajax({
        type: "post",
        async: false,
        url: contextPath,
        data: queryModel,
        datatype: "json",
        success:function(data){
            if (data != null) {
                var obj = 'data.'+dataArray;
                var jsonobj=eval(obj);
                var length=jsonobj.length;
                for(var i=0;i<length;i++){
                    var json = jsonobj[i].supplierName
                    if(i!=length-1){
                        str+=json+":"+json+";";
                    }else{
                        str+=json+":"+json;// 这里是option里面的 value:label
                    }
                }
                //$.each(jsonobj, function(i){
                //str+="personType:"+jsonobj[i].personType+";"
                //$("<option value='" + jsonobj[i].personType + "'>" + jsonobj[i].personType+ "</option>").appendTo(typeselect);
                //});
            }
            // alert(str);
        }
    });
    return str;
}